package com.study.exception;

import com.study.enumeration.ResponseEnum;

public class DefinitionException extends RuntimeException {

	private Integer errorCode;
	private String errorMsg;

	public DefinitionException(Integer errorCode, String errorMsg) {
		super();
		this.errorCode = errorCode;
		this.errorMsg = errorMsg;
	}

	public DefinitionException(ResponseEnum responseEnum) {
		super();
		this.errorCode = responseEnum.getCode();
		this.errorMsg = responseEnum.getMsg();
	}

	public Integer getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(Integer errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMsg() {
		return errorMsg;
	}

	public void setErrorMsg(String errorMsg) {
		this.errorMsg = errorMsg;
	}

	private static final long serialVersionUID = -7867584344897312229L;
}
